package com.ailatrieuphu;

import android.util.Log;

import com.ailatrieuphu.item.Player;

public class GlobalHanldeMessage {
	public static void processMessage(Message message) {
		switch (message.getCMD()) {
		case CMD.S_PLAYER_GET_MY_INFO:
			Player player = MyActivity.mPlayer;
			player.setId(message.readInt());
			player.setSessionID(message.readString());
			player.setName(message.readString());
			player.setGold(message.readInt());
			player.setWin(message.readInt());
			player.setLost(message.readInt());
			Log.e("CMd", player.getId()+"-"+player.getSessionID()+"-"+player.getName()+"-"+player.getGold());
			break;

		default:
			MyActivity.instance.processMessage(message);
			break;
		}
	}
}
